<script setup>
	const props = defineProps(['data', 'isShowDel', 'isShowEdit'])
	const emit = defineEmits('onDelete')
	// console.log(props.data);
</script>

<template>
	<view class="bg-white p-normal">
		<view class="d-flex d-flex-aic box">
			<uv-avatar :src="props.data.sysUser.avatar" size='40'></uv-avatar>
			<view class="d-flex-fx1 ml-normal">
				<view>{{props.data.sysUser.nickName}}</view>
				<view class="font-fs12 date">{{props.data.createTime}}</view>
			</view>
			<uv-tags v-if="props.isShowEdit" class="edit" @click="emit('onUpdate')" text="修改" type="info"></uv-tags>
			<uv-tags v-if="props.isShowDel" class="close" @click="emit('onDelete')" text="删除" type="info"></uv-tags>
		</view>
		<view class="mt-normal msg">
			{{props.data.ccContent}}
		</view>
	</view>
</template>

<style lang="scss" scoped>
	.box {
		position: relative;

		.close {
			position: absolute;
			top: 0;
			bottom: 0;
			right: 5px;
			margin: auto;
		}

		.edit {
			position: absolute;
			top: 0;
			bottom: 0;
			right: 60px;
			margin: auto;
		}
	}

	.date {
		color: #999999;
	}

	.msg {
		color: #666666;
		word-break: break-all;
	}
</style>